/*
 * @Author: daniel_du dll_2018@126.com
 * @Date: 2022-05-01 06:35:50
 * @LastEditors: daniel_du dll_2018@126.com
 * @LastEditTime: 2022-05-09 12:53:38
 * @FilePath: /safe_transmission_platform/src/util.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#ifndef __DANIEL_UTIL_H__
#define __DANIEL_UTIL_H__

#include <memory>
#include <sys/syscall.h>
#include <unistd.h>

namespace daniel
{
    template <typename T>
    class Singleton
    {
    public:
        static T *GetInstance()
        {
            static T v;
            return &v;
        }
        static std::shared_ptr<T> GetPtr()
        {
            static std::shared_ptr<T> v(new T);
            return v;
        }
    private:
    };
    uint32_t getThreadID();
    //获取系统当前事件   格式  yyyy-mm-dd hh:MM:ss
    std::string GetDatetime();
}


#endif